﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Web.WebPages.OAuth;
using WebMatrix.WebData;

namespace Echegoyen
{
    public class MyWebSecurity : IWebSecurity
    {
        public bool Login(string userName, string password, bool persistCookie = false)
        {
            return WebSecurity.Login(userName, password, persistCookie);
        }

        public void Logout()
        {
            WebSecurity.Logout();
        }

        public string CreateUserAndAccount(string userName, string password, object propertyValues = null, bool requireConfirmationToken = false)
        {
            return WebSecurity.CreateUserAndAccount(userName, password, propertyValues, requireConfirmationToken);
        }

        public string CurrentUserName
        {
            get { return WebSecurity.CurrentUserName; }
        }

        public bool UserExists(string p)
        {
            return WebSecurity.UserExists(p);
        }
    }
}